home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CMultStdPopupPane 2.0 / For TCL 1.1.3+ / CMultStdPopupPane.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.5 KB  |  56 lines  |  [TEXT/KAHL]

  1. /******************************************************************************
  2.  CMultStdPopupPane.h
  3.  
  4.         Interface for the CMultStdPopupPane Class
  5.         
  6.         Copyright © 1993 Michael Abramowicz. All rights reserved.
  7.  
  8.  ******************************************************************************/
  9.  
  10. #pragma once
  11.  
  12. #include "CStdPopupPane.h"
  13.  
  14. #define kDisabledMenuID        5368        /* Menu id to use for disabled menus */
  15.                                         /* Do not use this id for other menus */
  16. #define kTemporaryMenuID    5369        /* Menu ID to give menu a temporarily */
  17.                                         /* unique name. Don’t use this either */
  18.  
  19. class CMultStdPopupPane : public CStdPopupPane
  20. {
  21. public:
  22.  
  23.     short itsPseudoMenuID;
  24.  
  25.     void IMultStdPopupPane( short menuID, short pseudoMenuID,
  26.                 CView *anEnclosure, CBureaucrat *aSupervisor, short aWidth, 
  27.                 short aHeight, short aHEncl, short aVEncl);
  28.     virtual void IViewTemp( CView *anEnclosure, CBureaucrat *aSupervisor,
  29.                             Ptr    viewData);
  30.                             
  31.     virtual void Activate( void);
  32.     virtual void Deactivate( void);
  33.     
  34.     virtual void Dispose( void);
  35.  
  36.         
  37. protected:
  38.  
  39.     MenuHandle        itsMacMenu;        // handle to menu (detached from resource fork)
  40.     
  41.         /* Internal methods */
  42.     void IMultStdPopupPaneX( short menuID, short pseudoMenuID);
  43.     void ChangeMenuID(short index, short newID);
  44.     short FindItsMenuIndex(void);
  45.     void Disable(void);
  46.     void Enable(void);
  47.  
  48. };
  49.  
  50. typedef struct        /* CMultStdPopupPane template */
  51. {
  52.     StdPopupTemp    stdPopupTemp;
  53.     short            pseudoMenuID;        // menu id to use in run-time
  54. } MultStdPopupTemp, *MultStdPopupTempP;
  55.  
  56.